﻿using Nop.Core.Domain.Logistics;
using System.Data.Entity.ModelConfiguration;

namespace Nop.Data.Mapping.Logistics
{
    public partial class PlanNoteMap : EntityTypeConfiguration<PlanNote>
    {
        public PlanNoteMap()
        {
            this.ToTable("LogisticsPlanNote");
            this.HasKey(on => on.Id);
            this.Property(on => on.Note).IsRequired();

            this.HasRequired(pn => pn.Plan)
                .WithMany(p => p.PlanNotes)
                .HasForeignKey(on => on.PlanId);
        }
    }
}
